The invention relates to a three-dimensional optical measurement of the surface of objects. This plays a special part in construction, for example in reproduction, and a major part in production control, in particular for quality monitoring, in re-engineering, such as repairs, expansions of existing machines and installations. It is also increasingly being employed in the case of non-technical objects, such as, for example, in the quality control of foodstuffs or in the identification and authentication of persons. Further areas of use are three-dimensional modeling of objects for virtual reality and the multimedia and games sectors.
For many years, the principle of the xe2x80x9ccoded light approachxe2x80x9d (CLA) has been used for the three-dimensional measurement of objects. In this case, a projector successively illuminates an object with different light patterns, with structured light. A camera records images of the object thus illuminated. Projector, camera and object point form a triangle in this case. Triangulation is used to calculate the point coordinates on the object surface. A prerequisite for this is that the spatial positions of projector and camera in a fixed coordinate system are known beforehand. Moreover, an angle "PHgr" at which the projector illuminates the object point (FIG. 2) must be known for each point of the object image. The initially known position data are obtained by a calibration operation, and the camera angle xcexa of the viewing beam of the camera, which angle is associated with an object point, is known through the pixel coordinates and through the data from the optical camera calibration. The xe2x80x9ccoded light approachxe2x80x9d achieves the determination of the angle "PHgr" as follows: a series of strip-type light patterns with varying strip width are successively projected onto the stationary object and respective images thereof are recorded, and the bright and dark pixels of the object thus illuminated, separately for each pixel, are combined to form a coding, so that the projection angle "PHgr" can be inferred from the coding.
Since, in this method, each object point must maintain its position during all the image recordings with the different projected patterns, this method is well suited to static, unmoving objects, but is not suited to moving or deforming objects. Accordingly, use is not recommended, in the case of identification of persons, for faces or other body parts or in the case of moving objects on a transport device. Various proposals have been made for improving the method.
The literature reference [1] proposes that only a single pattern is projected and this pattern is composed of groups of colored vertical strips which comprise subgroups which are unique in the entire pattern and can thus be identified in the image of a color camera. If these subgroups are not disturbed or damaged, the projector light plane can be determined from them for each color strip and the triangulation can be carried out. The longer the subgroups, however, the greater the likelihood of disturbances which arise for example as a result of depth jumps or occlusions on the object. This leads to non-identified or incorrectly identified groups and thus to errors in the three-dimensional coordinate determination.
In the literature reference [2], it was found during investigations with groups of length 6 with four colors during simulated disturbances of the patterns that up to 20% of all the strips could not be determined and up to approximately 8% were decided incorrectly. Therefore, this method of determining the strip number from horizontal groups of vertical color strips must be rated as unsatisfactory.
Generally, it can be stated that, in order to determine the projection angle of a surface point of an object, the surroundings thereof must be considered if only a single pattern is intended to be projected. The larger the surroundings of a pixel which are necessary for determining (decoding) the projection angle, the greater the risk of damage to the coding as a result of depth jumps or occlusions.
An overview of known methods for three-dimensional measurement is afforded by the literature reference [3].
The invention is based on the object of providing a reliable light coding for the three-dimensional determination of surface coordinates of an object when using only a single projected pattern, whereby corruptions due to erroneous evaluation of the coding or due to a movement of the object are eliminated.
The invention is based on the fact that two-dimensional color patterns can be composed of individual pattern elements which can differ in terms of color or in terms of their spectral composition in a predetermined manner and in which it is possible to unambiguously reconstruct the projection angle "PHgr" in the recorded image of the object illuminated with the color pattern and assign it to each pattern element. This is done as follows: the color or the spectral composition of a selected pattern element is measured and this color or spectral composition is compared with one of the adjacent pattern elements in a row, which is oriented approximately horizontally, for example, and with one of the adjacent pattern elements situated in an adjacent row. In this case, then, the coding for a pattern element comprises the color of the pattern element itself and the color or spectral difference with respect to one of its neighbors in a preferably horizontal direction and one of its neighbors in a direction which lies approximately perpendicularly thereto. As a result, the local surroundings necessary for the coding are restricted to a minimum, namely to two of the immediate neighbors. The coding is designed in such a way that, in a color pattern, the combination of one pattern element presently under consideration with one of its immediately adjacent elements in the row and with one of its immediately adjacent elements from an adjacent row in the direction of the row is unique.
The geometrical form of the pattern elements may be arbitrary, for example polygonal (triangle, quadrangle, hexagon . . . ) or else circular. The directions of the preferably horizontal adjacency within a row and of the preferably vertical adjacency in the direction of an adjacent row need not be perpendicular to one another, but can differ by 90xc2x0. It is advantageous for a color pattern to be composed of pattern elements which represent elongate rectangles. In particular, short, vertically upright strips are used which differ systematically in terms of their colors or in terms of their spectral composition in the horizontal and vertical directions. If e.g. eight different colors are used, for example additively composed of the three primary colors red, green, blue, which are designated by the numbers 0, 1, 2, . . . 7, then one part of the color pattern can comprise the horizontal arrangement of eight vertical strip sections with the colors 0, 1, 2, 3, 4, 5, 6, 7, and another part of the color pattern can comprise the arrangement 0, 7, 6, 5, 4, 3, 2, 1. These two parts can be differentiated solely by a comparison with one of the horizontal neighbors, because the difference in the color numbers is ascending in the case of the first group and descending in the case of the second group (modulo 8!). Arranged one beside the other, e.g. the color sequence of length 16 is produced: xe2x80x9c0, 1, 2, 3, 4, 5, 6, 7, 0, 7, 6, 5, 4, 3, 2, 1xe2x80x9d. This can be repeated periodically a number of times one beside the other, that is to say in a row. In order to be able to differentiate the different periods of the entire color pattern from one another, there is arranged above and below this strip sequence, i.e. in adjacent rows, another strip sequence whose color numbers can be differentiated in the vertical direction by different differences in the color numbers.
In order to adapt the number of pattern elements or the size thereof to the surface structure and to the required accuracy of the resolution, the color pattern is constructed with correspondingly long rows with repeated sequences and from a multiplicity of at least two differently formed adjacent rows. From the two-dimensional color pattern, the horizontal position of a surface point within the sequence and thus the projection angle "PHgr" can be determined in the recorded camera image within the sequences, that is to say within a row. The horizontal position of a pattern element can thus be converted directly to the projection angle "PHgr". Overall, each color can be unambiguously classified and can be distinguished from every other color.
An advantageous refinement of the invention provides for a separating strip having a color or spectral composition that differs from all the pattern colors to be positioned between two rows. The color identity of two directly adjacent pattern elements in adjacent rows is permitted in this variant.